<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-weight:400; font-style:normal; "  bgcolor="#ffffff">
Version:0.9
StartHTML:0000000206
EndHTML:0000083622
StartFragment:0000000242
EndFragment:0000083586
SourceURL:https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_excel.html
<html>
<body>
<!--StartFragment--><h1 style="box-sizing: border-box; font-weight: var(--pst-font-weight-heading); line-height: 1.15; margin: 0px 0px 1.05rem; font-size: var(--pst-font-size-h1); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; color: var(--pst-color-primary); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">pandas.DataFrame.to_excel<span> </span></font></font><a class="headerlink" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_excel.html#pandas-dataframe-to-excel" title="Постоянная ссылка на этот заголовок" style="box-sizing: border-box; color: var(--pst-color-warning); text-decoration: none; overflow-wrap: break-word; visibility: hidden; font-size: 0.8em; margin-left: 0.2em; opacity: 0.4; padding: 0px 4px; transition: all 0.2s ease-out 0s; user-select: none;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"></font></font></a></h1><dl class="py method" style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0px; color: rgb(50, 50, 50); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><dt class="sig sig-object py" id="pandas.DataFrame.to_excel" style="box-sizing: border-box; font-weight: 700; font-family: var(--pst-font-family-monospace);"><span class="sig-prename descclassname" style="box-sizing: border-box; background-color: transparent;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">DataFrame.<span> </span></font></font></span></span><span class="sig-name descname" style="box-sizing: border-box; background-color: transparent; font-weight: bold; font-size: 1.1em; color: var(--pst-color-inline-code);"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">to_excel</font></font></span></span><span class="sig-paren" style="box-sizing: border-box; font-size: larger;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>(<span> </span></font></font></span><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">excel_writer</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>имя_листа<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">'Лист1'</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>na_rep<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">''</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>float_format<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">None</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>columns<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">None</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>header<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">True</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>index<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">True</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>index_label<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">None</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>startrow<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">0</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>startcol<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">0</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>engine<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">None</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>merge_cells<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">True</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>inf_rep<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">'inf'</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>Freeze_panes<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">None</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>Storage_options<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">None</font></font></span></span></em><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>,</font></font><em class="sig-param" style="box-sizing: border-box;"><span class="n" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>engine_kwargs<span> </span></font></font></span></span><span class="o" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">=<span> </span></font></font></span></span><span class="default_value" style="box-sizing: border-box;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">None</font></font></span></span></em><span class="sig-paren" style="box-sizing: border-box; font-size: larger;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>)</font></font></span><a class="reference external" href="https://github.com/pandas-dev/pandas/blob/v2.1.1/pandas/core/generic.py#L2193-L2354" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word;"><span class="viewcode-link" style="box-sizing: border-box; float: right;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">[источник]</font></font></span></span></a><a class="headerlink" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_excel.html#pandas.DataFrame.to_excel" title="Постоянная ссылка на это определение" style="box-sizing: border-box; color: var(--pst-color-warning); text-decoration: none; overflow-wrap: break-word; visibility: hidden; font-size: 0.8em; margin-left: 0.2em; opacity: 0.4; padding: 0px 4px; transition: all 0.2s ease-out 0s; user-select: none;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"></font></font></a></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 0px; margin-left: 2rem;"><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Запишите объект на лист Excel.</font></font></p><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Чтобы записать один объект в файл Excel .xlsx, необходимо только указать имя целевого файла.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Для записи на несколько листов необходимо создать объект<span> </span></font></font><cite style="box-sizing: border-box;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">ExcelWriter</font></font></cite><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>с именем целевого файла и указать лист в файле для записи.</font></font></p><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">На несколько листов можно записать, указав уникальное<span> </span></font></font><cite style="box-sizing: border-box;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">имя_листа</font></font></cite><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">После записи всех данных в файл необходимо сохранить изменения.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Обратите внимание, что создание объекта<span> </span></font></font><cite style="box-sizing: border-box;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">ExcelWriter</font></font></cite><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>с именем файла, которое уже существует, приведет к удалению содержимого существующего файла.</font></font></p><dl class="field-list" style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0px; display: grid; grid-template-columns: unset;"><dt class="field-odd" style="box-sizing: border-box; font-weight: bold; word-break: break-word; padding-left: 0.5em; padding-right: 5px; background-color: var(--pst-color-surface); margin-bottom: 0.1rem; margin-top: 0.2rem;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Параметры<span> </span></font></font><span class="colon" style="box-sizing: border-box;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">:</font></font></span></dt><dd class="field-odd" style="box-sizing: border-box; margin-top: 0em; margin-bottom: 0px; margin-left: 2rem; padding-left: 0.5em;"><dl style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">excel_writer<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">путь-подобный, файловый объект или объект ExcelWriter</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Путь к файлу или существующий ExcelWriter.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">имя_листа<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">строка, по умолчанию «Лист1»</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Имя листа, который будет содержать DataFrame.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">na_rep<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">ул, по умолчанию ''</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Отсутствует представление данных.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">float_format<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">строка, необязательно</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Строка формата для чисел с плавающей запятой.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Например<span> </span></font></font><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">float_format="%.2f"</span></code><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">, будет отформатировано от 0,1234 до 0,12.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">последовательность столбцов<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">или список строк, необязательно</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Столбцы для записи.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">заголовок<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">bool или список строк, по умолчанию True</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Запишите названия столбцов.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Если указан список строк, предполагается, что это псевдонимы имен столбцов.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">индекс<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">bool, по умолчанию True</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Напишите имена строк (индекс).</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">index_label<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">строка или последовательность, необязательно</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Метка столбца для индексных столбцов, если необходимо.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Если не указано и<span> </span></font></font><cite style="box-sizing: border-box;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">заголовок</font></font></cite><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>и<span> </span></font></font><cite style="box-sizing: border-box;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">индекс</font></font></cite><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>имеют значение True, используются имена индексов.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Последовательность должна быть указана, если DataFrame использует MultiIndex.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">startrow<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">int, по умолчанию 0</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Верхняя левая строка ячеек для дампа кадра данных.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">startcol<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">int, по умолчанию 0</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Верхний левый столбец ячейки для дампа кадра данных.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">мощность двигателя<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">, опционально</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Напишите используемый движок «openpyxl» или «xlsxwriter».<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Вы также можете установить это с помощью параметров<span> </span></font></font><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">io.excel.xlsx.writer</span></code><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">или<span> </span></font></font><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">io.excel.xlsm.writer</span></code><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">merge_cells<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">bool, по умолчанию True</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Запишите MultiIndex и Иерархические строки как объединенные ячейки.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">inf_rep<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">str, по умолчанию «inf»</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Представление бесконечности (в Excel нет собственного представления бесконечности).</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Freeze_panes<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">кортеж целого числа (длина 2), необязательно</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Указывает самую нижнюю строку и самый правый столбец, отсчитываемые от единицы, которые необходимо заморозить.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Storage_options<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">dict, необязательно</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 10px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Дополнительные параметры, которые имеют смысл для конкретного подключения к хранилищу, например хост, порт, имя пользователя, пароль и т. д. Для URL-адресов HTTP(S) пары ключ-значение перенаправляются в качестве<span> </span></font></font><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">urllib.request.Request</span></code><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">параметров заголовка.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Для других URL-адресов (например, начинающихся с «s3://» и «gcs://») пары ключ-значение перенаправляются на адрес<span> </span></font></font><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">fsspec.open</span></code><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">.<span> </span></font><font style="box-sizing: border-box; vertical-align: inherit;">Более подробную информацию см<span> </span></font></font><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">fsspec</span></code><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">. здесь<span> </span></font></font><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">urllib</span></code><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">, а дополнительные примеры вариантов хранения см.<span> </span></font></font><a class="reference external" href="https://pandas.pydata.org/docs/user_guide/io.html?highlight=storage_options#reading-writing-remote-files" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">здесь</font></font></a><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>.</font></font></p><div class="versionadded" style="box-sizing: border-box; background-color: var(--pst-color-on-background); border-left-width: 0.2rem; border-left-style: solid; border-color: var(--pst-color-success); border-radius: 0.25rem; margin: 1.5625em auto; overflow: hidden; padding: 0px 0.6rem; break-inside: avoid; position: relative; transition: color 0.25s ease 0s, background-color 0.25s ease 0s, border-color 0.25s ease 0s; vertical-align: middle; box-shadow: 0 .2rem .5rem var(--pst-color-shadow),0 0 .0625rem var(--pst-color-shadow) !important;"><p style="box-sizing: border-box; margin: 0.6rem 0px; color: var(--pst-color-text-base); font-size: 1em;"><span class="versionmodified added" style="box-sizing: border-box; font-style: italic; font-weight: 600;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Новое в версии 1.2.0.</font></font></span></p></div></dd><dt style="box-sizing: border-box; font-weight: 700;"><strong style="box-sizing: border-box; font-weight: bolder;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">engine_kwargs<span> </span></font></font></strong><span class="classifier" style="box-sizing: border-box; font-style: oblique;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">dict, необязательно</font></font></span></dt><dd style="box-sizing: border-box; margin-top: 3px; margin-bottom: 0px; margin-left: 2rem;"><p style="box-sizing: border-box; margin: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Аргументы произвольного ключевого слова передаются в Excel.</font></font></p></dd></dl></dd></dl><div class="admonition seealso" style="box-sizing: border-box; background-color: var(--pst-color-on-background); border-left-width: 0.2rem; border-left-style: solid; border-color: var(--pst-color-success); border-radius: 0.25rem; margin: 1.5625em auto; overflow: hidden; padding: 0px 0.6rem 0.8rem; break-inside: avoid; box-shadow: 0 .2rem .5rem var(--pst-color-shadow),0 0 .0625rem var(--pst-color-shadow) !important; clear: left;"><p class="admonition-title" style="box-sizing: border-box; margin: 0px -0.6rem; color: var(--pst-color-text-base); font-size: 1em; font-weight: var(--pst-admonition-font-weight-heading); padding: 0.4rem 0.6rem 0.4rem 2rem; position: relative;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;">Смотрите также</font></font></p><dl class="simple" style="box-sizing: border-box; margin: 0.4em 1.4rem 0px;"><dt style="box-sizing: border-box; font-weight: bold;"><a class="reference internal" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html#pandas.DataFrame.to_csv" title="pandas.DataFrame.to_csv" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word; margin-bottom: 0px;"><code class="xref py py-obj docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: inherit; background-color: var(--pst-color-surface); font-weight: bold; border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem; margin-bottom: 0px;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap; margin-bottom: 0px;">to_csv</span></code></a></dt><dd style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; margin-left: 2rem;"><p style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;">Запишите DataFrame в файл значений, разделенных запятыми (csv).</font></font></p></dd><dt style="box-sizing: border-box; font-weight: bold;"><a class="reference internal" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.ExcelWriter.html#pandas.ExcelWriter" title="панды.ExcelWriter" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word; margin-bottom: 0px;"><code class="xref py py-obj docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: inherit; background-color: var(--pst-color-surface); font-weight: bold; border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem; margin-bottom: 0px;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap; margin-bottom: 0px;">ExcelWriter</span></code></a></dt><dd style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; margin-left: 2rem;"><p style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;">Класс для записи объектов DataFrame в листы Excel.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: bold;"><a class="reference internal" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_excel.html#pandas.read_excel" title="pandas.read_excel" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word; margin-bottom: 0px;"><code class="xref py py-obj docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: inherit; background-color: var(--pst-color-surface); font-weight: bold; border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem; margin-bottom: 0px;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap; margin-bottom: 0px;">read_excel</span></code></a></dt><dd style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; margin-left: 2rem;"><p style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;">Считайте файл Excel в DataFrame pandas.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: bold;"><a class="reference internal" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html#pandas.read_csv" title="pandas.read_csv" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word; margin-bottom: 0px;"><code class="xref py py-obj docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: inherit; background-color: var(--pst-color-surface); font-weight: bold; border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem; margin-bottom: 0px;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap; margin-bottom: 0px;">read_csv</span></code></a></dt><dd style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; margin-left: 2rem;"><p style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;">Считайте файл значений, разделенных запятыми (csv), в DataFrame.</font></font></p></dd><dt style="box-sizing: border-box; font-weight: bold;"><a class="reference internal" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.io.formats.style.Styler.to_excel.html#pandas.io.formats.style.Styler.to_excel" title="pandas.io.formats.style.Styler.to_excel" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word; margin-bottom: 0px;"><code class="xref py py-obj docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: inherit; background-color: var(--pst-color-surface); font-weight: bold; border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem; margin-bottom: 0px;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap; margin-bottom: 0px;">io.formats.style.Styler.to_excel</span></code></a></dt><dd style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; margin-left: 2rem;"><p style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;"><font style="box-sizing: border-box; margin-bottom: 0px; vertical-align: inherit;">Добавьте стили в лист Excel.</font></font></p></dd></dl></div><p class="rubric" style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 30px; color: var(--pst-color-text-base); font-size: 1em; font-weight: bold; border-bottom: 1px solid var(--pst-color-border); display: flex; flex-direction: column;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Примечания</font></font></p><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Для совместимости с<span> </span></font></font><a class="reference internal" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html#pandas.DataFrame.to_csv" title="pandas.DataFrame.to_csv" style="box-sizing: border-box; color: var(--pst-color-link); text-decoration: none; overflow-wrap: break-word;"><code class="xref py py-meth docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 0.875em; overflow-wrap: break-word; color: inherit; background-color: var(--pst-color-surface); font-weight: bold; border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">to_csv()</span></code></a><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">to_excel сериализует списки и преобразует их в строки перед записью.</font></font></p><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">После сохранения книги невозможно записать дальнейшие данные без перезаписи всей книги.</font></font></p><p class="rubric" style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 30px; color: var(--pst-color-text-base); font-size: 1em; font-weight: bold; border-bottom: 1px solid var(--pst-color-border); display: flex; flex-direction: column;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Примеры</font></font></p><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Создайте, напишите и сохраните книгу:</font></font></p><div class="doctest highlight-default notranslate" style="box-sizing: border-box; clear: both; margin: 1em 0px; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset;"><div class="highlight" style="box-sizing: border-box; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset; position: relative; background: rgb(254, 254, 254); color: rgb(84, 84, 84);"><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; user-select: none;">&gt;&gt;&gt; </span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df1</span> <span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">pd</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">DataFrame</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">([[</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'a'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'b'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">],</span> <span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">[</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'c'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'d'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">]],</span></p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">... </span>                   <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">index</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">[</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'row 1'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'row 2'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">],</span></p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">... </span>                   <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">columns</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">[</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'col 1'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'col 2'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">])</span></p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">&gt;&gt;&gt; </span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df1</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">to_excel</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="s2" style="box-sizing: border-box; color: rgb(0, 128, 0);">"output.xlsx"</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span>  </p><p style="-qt-paragraph-type:empty; margin-top:0px; background-color:#eff0f1; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; font-size:10px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell0" style="box-sizing: border-box; border-radius: 0.4em; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0px; text-transform: none; appearance: button; position: absolute; cursor: pointer; display: flex; top: 0.3em; right: 0.3em; width: 1.7em; height: 1.7em; opacity: 0; transition: opacity 0.3s ease 0s, border 0.3s ease 0s, background-color 0.3s ease 0s; user-select: none; padding: 0px; outline: none; border: none; background-color: var(--pst-color-surface); color: var(--pst-color-muted); align-items: center; justify-content: center;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><rect x="8" y="8" width="12" height="12" rx="2"></rect><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path></svg></button></div></div><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Чтобы указать имя листа:</font></font></p><div class="doctest highlight-default notranslate" style="box-sizing: border-box; clear: both; margin: 1em 0px; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset;"><div class="highlight" style="box-sizing: border-box; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset; position: relative; background: rgb(254, 254, 254); color: rgb(84, 84, 84);"><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; user-select: none;">&gt;&gt;&gt; </span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df1</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">to_excel</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="s2" style="box-sizing: border-box; color: rgb(0, 128, 0);">"output.xlsx"</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span></p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">... </span>             <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">sheet_name</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'Sheet_name_1'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span>  </p><p style="-qt-paragraph-type:empty; margin-top:0px; background-color:#eff0f1; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; font-size:10px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell1" style="box-sizing: border-box; border-radius: 0.4em; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0px; text-transform: none; appearance: button; position: absolute; cursor: pointer; display: flex; top: 0.3em; right: 0.3em; width: 1.7em; height: 1.7em; opacity: 0; transition: opacity 0.3s ease 0s, border 0.3s ease 0s, background-color 0.3s ease 0s; user-select: none; padding: 0px; outline: none; border: none; background-color: var(--pst-color-surface); color: var(--pst-color-muted); align-items: center; justify-content: center;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><rect x="8" y="8" width="12" height="12" rx="2"></rect><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path></svg></button></div></div><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Если вы хотите писать более чем на один лист книги, необходимо указать объект ExcelWriter:</font></font></p><div class="doctest highlight-default notranslate" style="box-sizing: border-box; clear: both; margin: 1em 0px; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset;"><div class="highlight" style="box-sizing: border-box; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset; position: relative; background: rgb(254, 254, 254); color: rgb(84, 84, 84);"><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; user-select: none;">&gt;&gt;&gt; </span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df2</span> <span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df1</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">copy</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">()</span></p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">&gt;&gt;&gt; </span><span class="k" style="box-sizing: border-box; color: rgb(121, 40, 161);">with</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">pd</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">ExcelWriter</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'output.xlsx'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span> <span class="k" style="box-sizing: border-box; color: rgb(121, 40, 161);">as</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">writer</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">:</span>  </p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">... </span>    <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df1</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">to_excel</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">writer</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">sheet_name</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'Sheet_name_1'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span></p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">... </span>    <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df2</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">to_excel</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">writer</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">sheet_name</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'Sheet_name_2'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; background-color:#eff0f1; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; font-size:10px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell2" style="box-sizing: border-box; border-radius: 0.4em; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0px; text-transform: none; appearance: button; position: absolute; cursor: pointer; display: flex; top: 0.3em; right: 0.3em; width: 1.7em; height: 1.7em; opacity: 0; transition: opacity 0.3s ease 0s, border 0.3s ease 0s, background-color 0.3s ease 0s; user-select: none; padding: 0px; outline: none; border: none; background-color: var(--pst-color-surface); color: var(--pst-color-muted); align-items: center; justify-content: center;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><rect x="8" y="8" width="12" height="12" rx="2"></rect><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path></svg></button></div></div><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">ExcelWriter также можно использовать для добавления к существующему файлу Excel:</font></font></p><div class="doctest highlight-default notranslate" style="box-sizing: border-box; clear: both; margin: 1em 0px; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset;"><div class="highlight" style="box-sizing: border-box; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset; position: relative; background: rgb(254, 254, 254); color: rgb(84, 84, 84);"><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; user-select: none;">&gt;&gt;&gt; </span><span class="k" style="box-sizing: border-box; color: rgb(121, 40, 161);">with</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">pd</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">ExcelWriter</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'output.xlsx'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span></p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">... </span>                    <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">mode</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'a'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span> <span class="k" style="box-sizing: border-box; color: rgb(121, 40, 161);">as</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">writer</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">:</span>  </p><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="gp" style="box-sizing: border-box; user-select: none;">... </span>    <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df1</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">to_excel</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">writer</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">sheet_name</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'Sheet_name_3'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; background-color:#eff0f1; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; font-size:10px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell3" style="box-sizing: border-box; border-radius: 0.4em; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0px; text-transform: none; appearance: button; position: absolute; cursor: pointer; display: flex; top: 0.3em; right: 0.3em; width: 1.7em; height: 1.7em; opacity: 0; transition: opacity 0.3s ease 0s, border 0.3s ease 0s, background-color 0.3s ease 0s; user-select: none; padding: 0px; outline: none; border: none; background-color: var(--pst-color-surface); color: var(--pst-color-muted); align-items: center; justify-content: center;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><rect x="8" y="8" width="12" height="12" rx="2"></rect><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path></svg></button></div></div><p style="box-sizing: border-box; margin-bottom: 1.15rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">Чтобы установить библиотеку, которая используется для записи файла Excel, вы можете передать ключевое слово<span> </span></font></font><cite style="box-sizing: border-box;"><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;">engine</font></font></cite><font style="box-sizing: border-box; vertical-align: inherit;"><font style="box-sizing: border-box; vertical-align: inherit;"><span> </span>(движок по умолчанию выбирается автоматически в зависимости от расширения файла):</font></font></p><div class="doctest highlight-default notranslate" style="box-sizing: border-box; clear: both; margin: 1em 0px 0px; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset;"><div class="highlight" style="box-sizing: border-box; border-radius: 0.25rem; display: flex; flex-direction: column; width: unset; position: relative; background: rgb(254, 254, 254); color: rgb(84, 84, 84);"><p style=" font-family:'Consolas'; background-color:#eff0f1; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; user-select: none;">&gt;&gt;&gt; </span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">df1</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">.</span><span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">to_excel</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">(</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'output1.xlsx'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">,</span> <span class="n" style="box-sizing: border-box; color: rgb(84, 84, 84);">engine</span><span class="o" style="box-sizing: border-box; color: rgb(0, 128, 0);">=</span><span class="s1" style="box-sizing: border-box; color: rgb(0, 128, 0);">'xlsxwriter'</span><span class="p" style="box-sizing: border-box; color: rgb(84, 84, 84);">)</span>  </p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; font-size:10px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></div></div></dd></dl><!--EndFragment-->
</body>
</html></body></html>